package com.dingreading.cloud.soms.service;

import com.dingreading.cloud.common.util.PageUtil;
import com.dingreading.cloud.soms.entity.CaClass;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

import java.util.Date;
import java.util.List;

/**
 * 服务层。
 *
 * @author Administrator
 * @since 2023-11-22
 */
public interface CaClassService extends IService<CaClass> {

    Page<CaClass> pageList(PageUtil pageUtil, String storeUid, String keyword, Integer freeStatus, Integer enabled,String projectUid,String teacherUid);

    List<CaClass> getByStoreUid(String storeUid, String keyword, Integer enabled);

    CaClass getClassInfo(String storeUid, Long id);

    boolean haveRoomId(String storeUid, Long roomId);

    int dropBean(String storeUid, Long id);

    int updateEnabled(String storeUid, Long id, Integer enabled, String staffUid, String staffName, Date time);

    int setClose(String storeUid, Long id, String staffUid, String staffName, Date time);

    int updateStudentNum(String storeUid, Long id, String staffUid, String staffName, Integer studentNum);

    Page<CaClass> getInsertCassV2(PageUtil pageUtil, String storeUid, Long classId, String projectUid, String stageUid, String keyword);

    // 更新排课次数
    void updateScheduleNum(String corpUid, String storeUid, Long classId, int i);

    boolean haveProjectUid(String storeUid, String projectUid);

    boolean haveStageUid(String storeUid, String stageUid);

    boolean updateInfo(
            Long id, String className, Long roomId, String roomName, String teacherUid, String teacherName,
            String stageUid, String stageName, String remark, String staffUid, String staffName
    );

    List<CaClass> listByUidIn(String storeUid, List<String> classUidList);
}
